package com.sxm.yiwei.activitis;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.sxm.yiwei.MainActivity;
import com.sxm.yiwei.R;
import com.sxm.yiwei.tools.REXTools;

public class MsgRevisePhoneFinishActivity extends BaseActivity implements View.OnClickListener{

    private ImageView funback;
    private LinearLayout funsearch;
    private Button finishbt;
    private String phone;
    private TextView finishPhone;
    private ImageView backmain;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_fw_fun);
        phone = getIntent().getStringExtra("phone");
        initFunView();
        finishPhone.setText(REXTools.hidePhone(phone));
    }

    private void initFunView() {
        funback = (ImageView) findViewById(R.id.revisefinish_back);
        finishbt = (Button) findViewById(R.id.msgrevisefinishbt);
        finishPhone = (TextView) findViewById(R.id.revisefinish_phone);
        backmain = (ImageView) findViewById(R.id.revisephone_backmain);
        // 设置点击事件
        backmain.setOnClickListener(this);
        funback.setOnClickListener(this);
        finishbt.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.revisefinish_back:
                finish();
                break;
            case R.id.msgrevisefinishbt:
                finish();
                break;
            case R.id.revisephone_backmain:

                startActivity(new Intent(MsgRevisePhoneFinishActivity.this, MainActivity.class));
                AppManager.getAppManager().finishAllActivity();
                break;
        }
    }
}
